From d8bd52ce0d5e169675b48e6b7d9df8a404ecf4c8 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 22 Nov 2006 10:30:05 +0000 Subject: [PATCH] [TOOLS] Check for python-devel. Thanks to Ewan Mellor, Anthony Liguori, and Daniel P. Berrange for pointing out problems with and solutions for the problems with the first version. Signed-off-by: Jan Beulich --- tools/check/check_python_devel | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 tools/check/check_python_devel diff --git a/tools/check/check_python_devel b/tools/check/check_python_devel new file mode 100755 index 0000000000..1074f4cf07 --- /dev/null +++ b/tools/check/check_python_devel @@ -0,0 +1,16 @@ +#!/bin/bash +# CHECK-BUILD + +function error { + echo + echo " *** Check for python development environment FAILED" + exit 1 +} + +python -c ' +import os.path, sys +for p in sys.path: + if os.path.exists(p + "/config/Makefile"): + sys.exit(0) +sys.exit(1) +' || error -- 2.30.2